<template>
  <div class="table">
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="rank" label="排名" width="180" />
      <el-table-column prop="date" label="上榜时间" width="180" />
      <el-table-column prop="name" label="用户名称" width="180" />
      <el-table-column prop="score" label="得分" />
    </el-table>
  </div>
</template>

<script setup>
const tableData = [
  {
    date: '2016-05-03',
    name: 'Tom',
    score: '99',
    rank:1
  },
  {
    date: '2016-05-02',
    name: 'Tom',
    score: '98',
    rank:2
  },
  {
    date: '2016-05-04',
    name: 'Tom',
    score: '97',
    rank:3
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    score: '96',
    rank:4
  },
]
</script>

<style>
.table{
  margin-top:15px;
}
</style>